
#ifndef PHP_GREAT_CONFIG_H
#define PHP_GREAT_CONFIG_H

extern zend_module_entry great_config_module_entry;
#define phpext_great_config_ptr &great_config_module_entry

#ifdef PHP_WIN32
#	define PHP_GREAT_CONFIG_API __declspec(dllexport)
#elif defined(__GNUC__) && __GNUC__ >= 4
#	define PHP_GREAT_CONFIG_API __attribute__ ((visibility("default")))
#else
#	define PHP_GREAT_CONFIG_API
#endif

#ifdef ZTS
#include "TSRM.h"
#endif

PHP_MINIT_FUNCTION(great_config);
PHP_MSHUTDOWN_FUNCTION(great_config);
PHP_RINIT_FUNCTION(great_config);
PHP_RSHUTDOWN_FUNCTION(great_config);
PHP_MINFO_FUNCTION(great_config);

PHP_FUNCTION(confirm_great_config_compiled);	/* For testing, remove later. */
PHP_FUNCTION(gc_reload_config);
PHP_FUNCTION(gc_clear_config);
PHP_FUNCTION(gc_get);

/* 
  	Declare any global variables you may need between the BEGIN
	and END macros here:     
*/

/*
ZEND_BEGIN_MODULE_GLOBALS(great_config)
	HashTable * _list;
ZEND_END_MODULE_GLOBALS(great_config)
*/

/* In every utility function you add that needs to use variables 
   in php_great_config_globals, call TSRMLS_FETCH(); after declaring other 
   variables used by that function, or better yet, pass in TSRMLS_CC
   after the last function argument and declare your utility function
   with TSRMLS_DC after the last declared argument.  Always refer to
   the globals in your function as GREAT_CONFIG_G(variable).  You are 
   encouraged to rename these macros something shorter, see
   examples in any other php module directory.
*/

#ifdef ZTS
#define GREAT_CONFIG_G(v) TSRMG(great_config_globals_id, zend_great_config_globals *, v)
#else
#define GREAT_CONFIG_G(v) (great_config_globals.v)
#endif

#endif	/* PHP_GREAT_CONFIG_H */

